home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / spiele / publicdomain / amigamud-tt / mystuff / lists.m < prev    next >
Text File  |  1996-07-08  |  483b  |  33 lines

  1. /*
  2.  * lists.m - My utility list stuff
  3.  */
  4.  
  5. define t_util proc utility public ListMap(action a; list thing l)void:
  6.   thing th;
  7.   int count,i;
  8.  
  9.   count:=Count(l);
  10.   for i from 0 upto count-1 do
  11.     th:=l[i];
  12.     call(a, void)(th);
  13.   od;
  14. corp;
  15.  
  16.  
  17. define t_util proc utility public ListAll(action a; list thing l)bool:
  18.   thing th;
  19.   bool st;
  20.   int count,i;
  21.  
  22.   st:=true;
  23.   count:=Count(l);
  24.   for i from 0 upto count-1 do
  25.     th:=l[i];
  26.     st:=st and call(a, bool)(th);
  27.   od;
  28.   st
  29. corp;
  30.  
  31.  
  32.  
  33.